package com.xhwy.controller;

import com.xhwy.entity.People;
import com.xhwy.service.PeopleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : TheBugMaker
 * date    ：2021-11-12 16:22
 */
@RestController
@RequestMapping("people")
@Api(tags = "人员测试接口")
public class PeopleController {

    @Autowired
    private PeopleService peopleService;

    @PostMapping("add")
    @ApiOperation("添加用户接口")
    public String addPeople(@RequestBody People people){
        peopleService.addPeople(people);
        return "ok";
    }
}
